package cn.edu.shu.wechat.core.token;

public class MyToken extends Token{

	private String tokenName;
	public String getTokenName() {
		return tokenName;
	}

	private String expiresInName;
	private String appId;
	private String secret;
	private String baseAccessTokenUrl=
			"https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential";
	
		@Override
	protected String tokenName() {
		return this.tokenName;
	}

	@Override
	protected String expiresInName() {
		return this.expiresInName;
	}

	@Override
	protected String accessTokenUrl() {
		return getAccessTokenUrl();
	}

	public void setTokenName(String tokenName) {
		this.tokenName = tokenName;
	}

	public void setExpiresInName(String expiresInName) {
		this.expiresInName = expiresInName;
	}

	public void setAppId(String appId) {
		this.appId = appId;
	}

	public void setSecret(String secret) {
		this.secret = secret;
	}

	public String getAccessTokenUrl() {
		return this.baseAccessTokenUrl+"&appid="+appId+"&secret="+secret;
	}

	

	
}
